<template>
  <div class="monitoring-container">
    <!-- 星空背景 -->
    <div class="starry-background">
      <div class="stars"></div>
      <div class="stars2"></div>
      <div class="stars3"></div>
    </div>

    <!-- 主要内容 -->
    <div class="content-wrapper">
      <div class="glass-card">
        <div class="card-header">
          <h2><i class="fa fa-line-chart"></i> 监控中心</h2>
          <p>系统监控和性能分析</p>
        </div>

        <div class="card-body">
          <div class="placeholder-content">
            <div class="placeholder-icon">
              <i class="fa fa-line-chart"></i>
            </div>
            <h3>监控中心</h3>
            <p>请访问 Zabbix 仪表板查看详细监控数据</p>
            <div class="feature-list">
              <div class="feature-item">
                <i class="fa fa-server"></i>
                <span>服务器监控</span>
              </div>
              <div class="feature-item">
                <i class="fa fa-chart-line"></i>
                <span>性能分析</span>
              </div>
              <div class="feature-item">
                <i class="fa fa-bell"></i>
                <span>告警管理</span>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
import { onMounted } from 'vue'

onMounted(() => {
  console.log('监控中心页面已加载')
})
</script>

<style scoped>
.monitoring-container {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

/* 星空背景 */
.starry-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0c0c0c 0%, #1a1a2e 50%, #16213e 100%);
  z-index: -1;
}

.stars, .stars2, .stars3 {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
}

.stars {
  background-image:
    radial-gradient(2px 2px at 20px 30px, #eee, transparent),
    radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.8), transparent),
    radial-gradient(1px 1px at 90px 40px, #fff, transparent),
    radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.6), transparent);
  background-repeat: repeat;
  background-size: 200px 100px;
  animation: sparkle 3s linear infinite;
}

.stars2 {
  background-image:
    radial-gradient(1px 1px at 40px 60px, #fff, transparent),
    radial-gradient(1px 1px at 120px 25px, rgba(255,255,255,0.7), transparent),
    radial-gradient(2px 2px at 160px 90px, #eee, transparent);
  background-repeat: repeat;
  background-size: 300px 150px;
  animation: sparkle 2s linear infinite;
}

.stars3 {
  background-image:
    radial-gradient(1px 1px at 60px 20px, rgba(255,255,255,0.5), transparent),
    radial-gradient(2px 2px at 180px 60px, #fff, transparent),
    radial-gradient(1px 1px at 220px 120px, rgba(255,255,255,0.8), transparent);
  background-repeat: repeat;
  background-size: 400px 200px;
  animation: sparkle 4s linear infinite;
}

@keyframes sparkle {
  0% { transform: translateY(0px); }
  100% { transform: translateY(-200px); }
}

/* 内容样式 */
.content-wrapper {
  position: relative;
  z-index: 1;
  padding: 20px;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.glass-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  padding: 40px;
  max-width: 600px;
  width: 100%;
  text-align: center;
  color: white;
}

.card-header h2 {
  margin: 0 0 10px 0;
  font-size: 2.5em;
  font-weight: 300;
  color: #fff;
}

.card-header p {
  margin: 0 0 30px 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.1em;
}

.placeholder-content {
  text-align: center;
}

.placeholder-icon {
  font-size: 4em;
  color: #4CAF50;
  margin-bottom: 20px;
}

.placeholder-content h3 {
  font-size: 2em;
  margin-bottom: 15px;
  color: #fff;
}

.placeholder-content p {
  font-size: 1.2em;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 30px;
}

.feature-list {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 30px;
}

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  min-width: 120px;
  transition: all 0.3s ease;
}

.feature-item:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-5px);
}

.feature-item i {
  font-size: 2em;
  color: #4CAF50;
  margin-bottom: 10px;
}

.feature-item span {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9em;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .glass-card {
    margin: 20px;
    padding: 30px 20px;
  }

  .card-header h2 {
    font-size: 2em;
  }

  .feature-list {
    flex-direction: column;
    align-items: center;
  }

  .feature-item {
    width: 100%;
    max-width: 200px;
  }
}
</style>
